
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../common/models/index.dart';


class HomeState {
  // title
  final _title = "首页".obs;
  set title(value) => _title.value = value;
  get title => _title.value;

  // 布局配置是否加载完成
  final _layoutLoaded = false.obs;
  set layoutLoaded(bool value) => _layoutLoaded.value = value;
  bool get layoutLoaded => _layoutLoaded.value;

  // 当前 bottombar 页码
  final _currentIndex = 0.obs;
  set currentIndex(int value) => _currentIndex.value = value;
  int get currentIndex => _currentIndex.value;
  
  // 未读消息数量
  final _unReadNumber = 0.obs;
  set unReadNumber(int v) => _unReadNumber.value = v;
  int get unReadNumber =>  _unReadNumber.value;

  // 底部
  final homeTabList = <AppIndexModule>[].obs;

  /// 自定义页面布局
  final homePageList = <HomePageModel>[].obs;

  /// 是否大屏
  final _isBigScreen = false.obs;
  set isBigScreen(bool value) => _isBigScreen.value = value;
  bool get isBigScreen => _isBigScreen.value;

  final Rx<Widget?> imDetailView = Rx<Widget?>(null);

}
